/*
 * Copyright 2009 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.android.apps.mytracks.content;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * A investigado.
 * 
 * @author Leif Hendrik Wilden
 * @author Rodrigo Damazio
 */
public final class TelefonoInvestigado implements Parcelable {

  private long id = -1L;
  private long investigadoId = -1L;
  private String numero = "";
  private String tipo = "";

  public TelefonoInvestigado() {}
  
  public TelefonoInvestigado(long investigadoId, String numero, String tipo) {
    this.setInvestigadoId(investigadoId);
    this.numero = numero;
    this.tipo = tipo;
  }
  
  public TelefonoInvestigado(long telefonoId, long investigadoId, String numero, String tipo) {
    this.id = telefonoId;
    this.investigadoId = investigadoId;
    this.numero = numero;
    this.tipo = tipo;
  }

  private TelefonoInvestigado(Parcel source) {
    id = source.readLong();
    investigadoId = source.readLong();
    numero = source.readString();
    tipo = source.readString();
  }

  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(id);
    dest.writeLong(investigadoId);
    dest.writeString(numero);
    dest.writeString(tipo);
  }

  public static final Parcelable.Creator<TelefonoInvestigado> CREATOR = new Parcelable.Creator<TelefonoInvestigado>() {
      @Override
    public TelefonoInvestigado createFromParcel(Parcel in) {
      return new TelefonoInvestigado(in);
    }

      @Override
    public TelefonoInvestigado[] newArray(int size) {
      return new TelefonoInvestigado[size];
    }
  };

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }
  

  public String getNumero() {
    return numero;
  }

  public void setNumero(String numero) {
    this.numero = numero;
  }

  public String getTipo() {
    return tipo;
  }

  public void setTipo(String tipo) {
    this.tipo = tipo;
  }

  public long getInvestigadoId() {
    return investigadoId;
  }

  public void setInvestigadoId(long investigadoId) {
    this.investigadoId = investigadoId;
  }
}
